home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ARun(REL2) ARP User's Manual ARun(REL2)
-
-
-
- NAME
- ARun - Run a process in the background.
-
- SYNOPSIS
- ARun Program_Command/... </k >/k NOIO/S STACK/K PRI/K
-
- Description
- ARun starts up programs as background processes, similarly
- to the AmigaDOS Run command. One of the big differences
- between Run and ARun is that ARun knows about ARP's resident
- list, and can take advantage of programs that you have
- placed there (see the manual page for Resident for more
- information). Resident programs load quicker, and save you
- lots of memory. In addition, ARun allows you to set the size
- of the stack for the new process, its priority, and to
- redirect IO for the new process. You can also tell ARun
- that you don't want any default files opened for this
- process, but this must be done with care.
-
- Programs which begin with the new ARP resident program tag
- (as all ARP programs currently do) will also have the stack
- size for the program set automatically by ARun, whether or
- not they are installed on the resident list. This means
- memory savings, and no more crashes due to stack problems.
-
- The NOIO switch launches a program without any default file
- handles. This is useful when you want to launch a program
- from the CLI and then close it later, but still have the
- background process running. Without the NOIO option, the
- CLI window will not close until the last process launched
- from that cli has terminated. Care must be used with this
- option, since many programs need default file handles to
- operate correctly.
-
- EXAMPLE
- Launch a program with priority -5, stacksize of 4000 and
- noio:
-
- ARun MyProgram Mycommands NOIO STACKSIZE 4000 PRI -5
-
- The same process under AmigaDOS would be accomplished in
- this way:
-
- Stack 4000 ; set the stack
- ChangeTaskPri -5 ; set the priority, things slow down here!
- Run <NIL: >NIL: MyProgram Mycomands ; launch
- ChangeTaskPri 0 ; reset the priortiy
- Stack 10240 ; reset the stack.
-
- The arp command is much more convenient.
-
-
-
-
-
- Page 1 (printed 2/22/88)
-
-
-
-
-
-
- ARun(REL2) ARP User's Manual ARun(REL2)
-
-
-
- DIFFERENCES
- The AmigaDOS Run command does not use its own argument
- parser, and it spawns a subshell to handle the commands for
- you. These two differences in implementation cause the
- following changes in the behavior of Arun from Run:
-
- Argument parser - since ARun DOES use the ARP argument
- parser, you have the same convenience in entering
- commands with ARun as you do with the rest of the
- ARP commands. The only problem occurs when you need
- to pass a quoted argument to a sub-process, this
- occurs rarely, but it can happen. Here is how it is
- done:
-
- ARun Command "\"Quoted Arg\""
-
- Where the \ represents the current escape character
- (see Set). The outer quotes are for ARun, and the
- Escaped Quotes tell ARun (or the argument parser) to
- send the argument to the subprocess as a quoted
- string.
-
- Subshell - ARun does not spawn a subshell, this has its good
- side and its bad. The good side is that this is a
- very low overhead command, and folks are now free to
- replace the CLI shell. The bad side is that you
- can't pass through lists of arguments. Therefore
- the run command+ feature of Run will not work with
- ARun. This will be taken care of by an actual
- invokable shell, as it should have been done in the
- first place.
-
- IMPORTANT NOTE
- This program is called ARun and not RUN for a good reason:
- we don't want you to delete your Run program just yet. The
- problem is that AmigaDOS provided a program function call
- which loads and runs another program. The problem with that
- is that in order to run the program this function call first
- loads and runs Run, and Run runs the program. If this seems
- strange to you, it is probably because it is strange.
-
- Unfortunately, some programs out there have used this
- function call, and won't work if the AmigaDOS run is
- missing. Actually, they won't work if the AmigaDOS run is
- not in the C: directory, and many problems with this have
- been encountered by users and programmers. ARP has now
- provided a replacement for this function call which works
- much better, and does not rely on any other program being
- anywhere. New programs will probably use this, but until
- more of them do, and the CLI is ultimately replaced, delete
- Run only if you know it won't interfere with things.
-
-
-
-
- Page 2 (printed 2/22/88)
-
-
-
-
-
-
- ARun(REL2) ARP User's Manual ARun(REL2)
-
-
-
- Actually, a good side to this is that you can leave Run in
- your C: directory, and place ARun in your ramdisk, using it
- instead. Most of the past problems with Run have been
- caused by people moving it into another directory and then
- into their RAM: disk.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 3 (printed 2/22/88)
-
-
-
-